<div ng-controller="UserChangepwdController" id="b-form">
    <div class="head">
        <h1>
            修改密码
        </h1>
    </div>
    <div class="body">
        <form ng-submit="submit(form.$valid)" novalidate name="form" class="form-horizontal">
            <div class="form-group"
                 ng-class="{'has-error':!form['password'].$pristine && form['password'].$invalid && !form['password'].$focused}">
                <label for="password" class="col-sm-2 col-md-1 control-label">旧密码</label>
                <div class="col-sm-10 col-md-11">
                    <input type="password"
                           class="form-control input-inline"
                           id="password"
                           name="password"
                           ng-model="data.password"
                           required="true"
                           ng-minlength="6"
                           tabindex="1"
                           ng-focus/>
                    <div class="help-block">
                        6-20位
                    </div>
                </div>
            </div>
            <div class="form-group"
                 ng-class="{'has-error':!form['password-new'].$pristine && form['password-new'].$invalid && !form['password-new'].$focused}">
                <label for="password-new" class="col-sm-2 col-md-1 control-label">新密码</label>

                <div class="col-sm-10 col-md-11">
                    <input type="password"
                           class="form-control input-inline"
                           id="password-new"
                           name="password-new"
                           ng-model="data['password-new']"
                           required="true"
                           ng-minlength="6"
                           tabindex="1"
                           ng-focus/>
                    <div class="help-block">
                        6-20位
                    </div>
                </div>
            </div>
            <div class="form-group"
                 ng-class="{'has-error':!form['password-repeat'].$pristine && form['password-repeat'].$invalid && !form['password-repeat'].$focused}">
                <label for="password-repeat" class="col-sm-2 col-md-1 control-label">重复密码</label>

                <div class="col-sm-10 col-md-11">
                    <input type="password"
                           class="form-control input-inline"
                           id="password-repeat"
                           name="password-repeat"
                           ng-model="data['password-repeat']"
                           required="true"
                           ng-minlength="6"
                           tabindex="1"
                           ng-equal="password-new"
                           ng-focus/>
                    <div class="help-block">
                        6-20位
                    </div>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-10 col-md-11 col-sm-offset-2 col-md-offset-1">
                    <button type="submit" ng-disabled="form.$invalid" class="btn btn-primary">修改</button>
                </div>
            </div>
        </form>
    </div>
</div>